package com.gqc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gqc.bean.Cart;
import com.gqc.dao.CartMapper;

@Service("CartService")
public class CartService {

	@Autowired
	CartMapper cartMapper;

	public void insertCart(Cart cart) {

		cartMapper.insertSelective(cart);

	}

	public List<Cart> queryCart(int id) {

		return cartMapper.selectByUser(id);
	}
public Cart querybyId(int id) {
		
		return cartMapper.selectByPrimaryKey(id);
	}
}
